﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mimoza.Transport
{
    public class ErrorReply : TransferObjectGenericReply<ErrorReply>
    {
        public ErrorReply()
        {
        }

        public ErrorReply(Exception exception)
        {
            ExceptionString = exception.ToString();
        }

        public string ExceptionString
        {
            get { return m_exceptionStr; }
            set { m_exceptionStr = value; }
        }

        public void ThowIt()
        {
            if (ExceptionString != null)
            {
                throw new Mimoza.Common.BaseException(ExceptionString,true);
            }
        }

        private string m_exceptionStr;
    }
}
